GBML manual / Constants

BGLOOK_ROAD

A winding road: the picture swings to the left and to the right, more and more toward the bottom of the screen.

Syntax

BGLOOK_ROAD: constant

<!-- GENERATED by tools/gbabel_looks.py from its LOOKS registry. Never edit this page: change the registry and re-run it. -->

Description

Names the winding road, for background_look. The top of the screen stays where it is, and each row below it is moved a little more than the one above, so a straight road in the picture bends into a curve. The curve swings from the left to the right and back again.

strength is how far the bottom row swings, each way: 16, 32 or 56 pixels.

A real capture, four pictures of the same straight road running away to the horizon - straight, then with BGLOOK_ROAD at strength 1, strength 2 and strength 3 (the top of the screen stays where it is while the bottom swings further and further to the right, so the road bends)A real capture, four pictures of the same straight road running away to the horizon - straight, then with BGLOOK_ROAD at strength 1, strength 2 and strength 3 (the top of the screen stays where it is while the bottom swings further and further to the right, so the road bends)
A real capture, four pictures of the same straight road running away to the horizon - straight, then with BGLOOK_ROAD at strength 1, strength 2 and strength 3 (the top of the screen stays where it is while the bottom swings further and further to the right, so the road bends)

The same picture four times: straight, then strength 1, 2 and 3 from left to right, each one standing still where the pattern had got to. Real pictures from a Game Boy Advance ROM.

speed is how fast it swings. 1 is one whole swing, left to right and back again, every four seconds. 0 holds the road at a bend that is not swinging, and a negative number swings the other way round.

A real capture, 16 frames played in a loop - the road swings into a bend on one side, straightens, and swings into a bend on the other side, the top of the screen never movingA real capture, 16 frames played in a loop - the road swings into a bend on one side, straightens, and swings into a bend on the other side, the top of the screen never moving
A real capture, 16 frames played in a loop - the road swings into a bend on one side, straightens, and swings into a bend on the other side, the top of the screen never moving

The road swinging, sped up: sixteen real pictures four frames apart, played 70 milliseconds each, at strength 3. It is a whole swing, so the loop has no seam. This picture is an animated PNG; a viewer that cannot animate shows its first frame.

Example

backdrop = background_create(0, 0, ts_doc_dungeon);
background_look(backdrop, BGLOOK_ROAD, 2, 0.5);

A road that winds from side to side. Turn it off with background_look(my_background, BGLOOK_NONE, 0, 0) before you destroy the background.

See also: background_lookBGLOOK_NONEBGLOOK_FLOOR